﻿<phone:PhoneApplicationPage
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
	x:Class="HexingColors.MainPage"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	SupportedOrientations="Portrait" Orientation="Portrait"
	shell:SystemTray.IsVisible="True">

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="#FF333333">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="0.787*"/>
			<RowDefinition Height="0.213*"/>
		</Grid.RowDefinitions>

		<!--TitlePanel contains the name of the application and page title-->
		<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
			<TextBlock x:Name="ApplicationTitle" Text="ADIVINA EL COLOR:" Style="{StaticResource PhoneTextNormalStyle}"/>
			<TextBlock x:Name="PageTitle" Text="#FFFFFF" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
		</StackPanel>

		<!--ContentPanel - place additional content here-->
		<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Grid.RowSpan="2">
			<TextBlock x:Name="txtStatus" Height="35" Margin="17,0,24,47" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="24" Text="Linea de estatus"/>
			<Button x:Name="btnNewGame" Content="Jugar de nuevo" Height="73" Margin="0,0,8,25" VerticalAlignment="Bottom" FontSize="24" Click="btnNewGame_Click" Background="Black" HorizontalAlignment="Right" Width="219" />
			<Grid x:Name="easyLevel" Margin="18,5,23,116" Visibility="Collapsed">
				<Rectangle x:Name="recPanelEasy1" Fill="Black" Height="200" VerticalAlignment="Top" MouseLeftButtonDown="panelSelected" d:LayoutOverrides="HorizontalAlignment" Margin="0,3,0,0" />
				<Rectangle x:Name="recPanelEasy2" Fill="Black" Height="200" MouseLeftButtonDown="panelSelected" VerticalAlignment="Bottom" d:LayoutOverrides="HorizontalAlignment, Height" Margin="0,0,0,1" />
			</Grid>
			<Grid x:Name="mediumLevel" Margin="18,8,25,117">
				<Rectangle x:Name="recPanelMedium1" Fill="Black" Height="200" VerticalAlignment="Top" Margin="0,0,213,0" Width="200" MouseLeftButtonDown="panelSelected" />
				<Rectangle x:Name="recPanelMedium2" Fill="Black" Height="200" VerticalAlignment="Top" Margin="213,0,0,0" Width="200" MouseLeftButtonDown="panelSelected" />
				<Rectangle x:Name="recPanelMedium3" Fill="Black" Margin="0,0,213,0" Width="200" Height="200" MouseLeftButtonDown="panelSelected" VerticalAlignment="Bottom" d:LayoutOverrides="Height" />
				<Rectangle x:Name="recPanelMedium4" Fill="Black" Margin="213,0,0,0" Width="200" Height="200" MouseLeftButtonDown="panelSelected" VerticalAlignment="Bottom" d:LayoutOverrides="Height" />
			</Grid>
			<Grid x:Name="hardLevel" Margin="14,5,29,112" Visibility="Collapsed">
				<Rectangle x:Name="recPanelHard1" Fill="Black" Height="130" VerticalAlignment="Top" Margin="8,6,275,0" Width="130" MouseLeftButtonDown="panelSelected" />
				<Rectangle x:Name="recPanelHard2" Fill="Black" Height="130" VerticalAlignment="Top" Margin="146,6,137,0" Width="130" MouseLeftButtonDown="panelSelected" d:LayoutOverrides="HorizontalAlignment" />
				<Rectangle x:Name="recPanelHard3" Fill="Black" Height="130" VerticalAlignment="Top" Margin="283,6,0,0" Width="130" MouseLeftButtonDown="panelSelected" />
				<Rectangle x:Name="recPanelHard4" Fill="Black" Margin="8,144,275,140" Width="130" MouseLeftButtonDown="panelSelected" />
				<Rectangle x:Name="recPanelHard5" Fill="Black" Margin="146,144,137,140" Width="130" MouseLeftButtonDown="panelSelected" d:LayoutOverrides="HorizontalAlignment" />
				<Rectangle x:Name="recPanelHard6" Fill="Black" Margin="283,144,0,140" Width="130" MouseLeftButtonDown="panelSelected" />
				<Rectangle x:Name="recPanelHard7" Fill="Black" Margin="8,0,275,4" Width="130" MouseLeftButtonDown="panelSelected" Height="130" VerticalAlignment="Bottom" />
				<Rectangle x:Name="recPanelHard8" Fill="Black" Margin="146,0,137,4" Width="130" MouseLeftButtonDown="panelSelected" d:LayoutOverrides="HorizontalAlignment" Height="130" VerticalAlignment="Bottom" />
				<Rectangle x:Name="recPanelHard9" Fill="Black" Margin="283,0,0,4" Width="130" MouseLeftButtonDown="panelSelected" Height="130" VerticalAlignment="Bottom" />
			</Grid>
		</Grid>
		
	</Grid>

    <!--ApplicationBar Menu for difficulty level and game info-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appBarEasy" IconUri="/Images/appbar_easy.png" Text="Fácil" Click="newEasyGame" />
            <shell:ApplicationBarIconButton x:Name="appBarMedium" IconUri="/Images/appbar_medium.png" Text="Medio"  Click="newMediumGame" />
            <shell:ApplicationBarIconButton x:Name="appBarHard" IconUri="/Images/appbar_hard.png" Text="Difícil"  Click="newHardGame" />
            <shell:ApplicationBarIconButton x:Name="appBarHelp" IconUri="/Images/appbar_info.png" Text="Info" Click="showHelp" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>